<%--
  Created by IntelliJ IDEA.
  User: XT
  Date: 2022/5/11
  Time: 16:45
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>员工信息</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui/css/default.css" />
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="easyui/css/demo.css">
    <script type="text/javascript" src='easyui/js/outlook2.js'> </script>
    <script type="text/javascript" src="easyui/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/themes/locale/easyui-lang-zh_CN.js"></script>

</head>
<body>
<form action="${pageContext.request.contextPath}/SelectServlet" method="post">
    <div style="float: left" class="datagrid-btn-separator">
        &nbsp;&nbsp;姓&nbsp;名:<input id="search_student_name" class="easyui-textbox" name="xm">
        <input type="submit"  value="搜索" >
    </div>
</form>
<form action="${pageContext.request.contextPath}/SelectGhServlet" method="post">
    <div style="float:left;margin-left: 15px" >&nbsp;&nbsp;工&nbsp;号:<input id="clazzList" class="easyui-textbox" name="ygh" />
        <input type="submit"  value="搜索"  >
    </div>
    <span style="color: green;font-size: 17px">${Deletemessage}</span>
</form>
<table class="easyui-datagrid" title="员工信息" style="width: 100%; height: 100%" data-options="singleSelect:true,collapsible:true" toolbar=#toolbar rownumbers="true" pagination="true">
    <thead data-options="frozen:true">
    <tr>
        <th data-options="field:'ygh',width:150">工号</th>
        <th data-options="field:'xm',width:150">姓名</th>
        <th data-options="field:'xb',width:150">性别</th>
        <th data-options="field:'zw',width:150">职位</th>
        <th data-options="field:'delete',width:150,align:'center'"></th>

    </tr>
    </thead>
    <tbody>
    <c:forEach var="yg" items="${yg}">
        <tr>
            <td>${yg.ygh}</td>
            <td>${yg.xm}</td>
            <td>${yg.xb}</td>
            <td>${yg.zw}</td>
            <td ><a  href="<%=request.getContextPath()%>/DeleteYgServlet?ygh=${yg.ygh}" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除</a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div id="toolbar">
    <a href="register.jsp" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加员工</a>
    <a href="${pageContext.request.contextPath}/YGServlet" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</a>
</div>
</body>
<script type="text/javascript">
    //删除
    //点击事件
    $(function(){
        //提示框弹窗
        $('#delete').bind('click',function () {
            $.messager.confirm({
                title:'注意',//标题
                msg:'确定删除吗?',//提示文字

            });
        })

    })


</script>
</html>
